<div class="in-ipad">
	<div class="bg-pattern pb-50">
		<div class="container pt-40">
			<div class="col-xs-12 col-sm-12 col-md-12">
				<div class="main-product">
					<img src="/files/images/<?php echo @$product['Product']['image']?>" width="609" height="353">
					<img src="/images/fr_dotted_product.png" alt="" class="fr-product" />
				</div>
			</div>
		  <!--<img src="/images/logo_aeon.png" alt="" class="logo-aeon" />-->
		</div><!-- /container -->
	</div><!-- /bg-pattern -->
  
    <?php echo $this->Form->create('UserProduct'); ?>
    <div class="bg-blue">
        <div class="container">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <h2 class="name-product"><?php echo @$product['Product']['name'];?></h2>
                <div class="welcome-block">
                  <p class="welcome-text welcome-01">Hi, <?php echo $user['fullname'];?></p>
                    <div>
                        <?php if(isset( $product['Product']['product_id'])):?>
                            <p class="welcome-text welcome-02">Nhập giá sản phẩm</p>
                            <?php echo $this->Form->input('price_suggest', array('type'=> 'text', 'label' => false, 'class' => 'input-price', 'value'=> @$price_suggest));?>
                        <?php else:?>
                            <p class="welcome-text welcome-02" align="center">Sản phẩm chưa được hiển thị</p><br />
                        <?php endif;?>
                    </div>
                </div>
            </div>
            
            <div class="align-center" style="clear:both">
            <?php if(!isset($price_suggest)) :?>
                <?php if(!isset( $product['Product']['product_id'])):?>
                    <a style="text-decoration:none" href="/users/input_price"><input type="button" class="button-01" value="Tải sản phẩm"/></a>
                <?php else :?>
                    <input type="submit" class="button-01" value="Đồng Ý"/>
                    
                    <?php
                        echo $this->Form->input('user_id', array('type' => 'hidden', 'value' => $user['user_id']));
                        echo $this->Form->input('product_id', array('type' => 'hidden', 'value' => $product['Product']['product_id']));
                    ?>
                <?php endif;?>
            <?php else :?>
                <p class="welcome-text welcome-02">Vui lòng chờ kết quả</p>
            <?php endif;?>
            </div>
            
			<a href="/users/logout" class="btn-logout">Đăng kí mới</a>
        </div><!-- /container -->
    </div>
	<?php echo $this->Form->end(); ?>
</div>
<script type="text/javascript">
$(function(){
   $('.input-price').number(true);
});
</script>